-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement ACP-176 #815
Implement ACP-176 #815
Conversation
b32c4bf
to
4def348
Compare
7d140d9
to
7a9d31d
Compare
634d88c
to
4125251
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partial review as things are a bit chaotic for me today and I don't want to leave you hanging (sorry).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know if you think I should re-review any of your responses / changes before you merge. Sorry this took a bit longer than usual.
Co-authored-by: Arran Schlosberg <519948+ARR4N@users.noreply.github.com> Signed-off-by: Stephen Buttolph <stephen@avalabs.org>
Why this should be merged
This PR implements ACP-176 with the exception of the allowance of empty blocks.
I will make a PR to update ACP-176 not to modify the validity condition of empty blocks with the reasoning that:
How this works
This PR adds
FUpgrade
checks to the following critical behaviors:GasCapacity
is introduced. In verification and block building,GasCapacity
replaces the prior usage ofGasLimit
. It is guaranteed forGasCapacity <= GasLimit
.GasUsed
verification. This verification now merges theGasUsed
andExtraDataGasUsed
and enforces the sum to be within the availableGasCapacity
.BaseFee
,ExtraPrefix
, andGasLimit
functions were modified to include the ACP-176 definitions along with their corresponding verification functions.PredicateBytesFromExtra
was expanded to account for the differentextraPrefix
sizes (depending on if the windower or acp-176 state is encoded)BaseFee
.GasTarget
. When proposing blocks, the block proposer will move the chain'sGasTarget
toward their ownGasTarget
.How this was tested
This PR includes unit tests for all of the modifications and additions to the
header
package.Need to be documented?
Yes, the new
GasTarget
config should be documented.Need to update RELEASES.md?
Yes the config changes should be included in the release notes.